{include file="public/head" title="充值列表" keywords="充值列表" description="充值列表" /}
<div id="offCanvasWrapper" class="mui-off-canvas-wrap mui-draggable">
    <!-- 菜单容器 -->

    <div class="mui-inner-wrap">
        <div id="offCanvasContentScroll" class="mui-content mui-scroll-wrapper" style="background-color: #fff;">
            <div class="mui-scroll">
                <header class="tx_head">
                    <p>
                        <a href="javascript:history.go(-1)" class="header_p1"><span class="mui-icon mui-icon-arrowleft"></span></a>
                    <h5>修改手机号码</h5>
                    </p>
                </header>
                <main class="cpmx2_main">
                    <section class=" line">
                        <ul class="jyjl_ul">
                            <input type="hidden" name="id" value="{$userinfo['id']}">
                            <li style="clear: both;margin-top: 30px;">修改手机号码:
                                <input style="width: 280px;height: 28px;border-radius: 50px;" type="text" name="phone" value="{$userinfo['phone']}" placeholder="填写手机号码"/>
                            </li>
                        </ul>
                    </section>
                    <button class="bdyhk_button" id="bank_btns" style="margin-bottom: 2rem; background-color: #01cebf;line-height: 1rem;">提交</button>
                </main>
                {/empty}
                <br>
                <br>
                <br>
            </div>
        </div>
        <div class="mui-off-canvas-backdrop"></div>
    </div>
</div>

{include file="public/footer"}
</body>

<script>
    $("#bank_btns").click(function(){
        var id = $("input[name='id']").val();
        var phone = $("input[name='phone']").val();

        $.ajax({
            type:"post",
            url:'{:url("edithpone")}',
            dataType:"json",
            data:{id:id,phone:phone},
            success: function(data){
                if(data.code == 1){
                    layer.msg(data.msg, {icon: 6, time: 1000},function(){
                        window.location.href = "{:url('userinfo')}";
                    });
                }else{
                    layer.msg(data.msg, {icon: 5, time: 2000});
                }
            }
        });
    });
</script>
</html>